// 注册自定义指令 到  Vue.directive
import hasRole from '@/directive/permiss/hasRole.js'
import hasShopPerm from '@/directive/permiss/hasShopPerm.js'
import hasPerm from '@/directive/permiss/hasPerm.js'

// 注册到 Vue.directive
const install = function(Vue) {
  //  指令名v-hasRole
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasShopPerm', hasShopPerm) 
   Vue.directive('hasPerm', hasPerm) 
     
}

if (window.Vue) {
  window['hasRole'] = hasRole
  window['hasShopPerm'] = hasShopPerm
  window['hasPerm'] = hasPerm
  Vue.use(install); // eslint-disable-line
}

export default install
